// **********************************************************************
//
// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.2.1

package ru.fizteh.fivt.JobProcessor;

public abstract class AMI_Processor_solve extends IceInternal.OutgoingAsync
{
    public abstract void ice_response(Parameter[] __ret);
    public abstract void ice_exception(Ice.LocalException ex);
    public abstract void ice_exception(Ice.UserException ex);

    public final void
    __invoke(Ice.ObjectPrx __prx, AMI_Processor_solve __cb, Problem theProblem, java.util.Map<String, String> __ctx)
    {
        try
        {
            __prepare(__prx, "solve", Ice.OperationMode.Normal, __ctx);
            theProblem.__write(__os);
            __os.writePendingObjects();
            __os.endWriteEncaps();
        }
        catch(Ice.LocalException __ex)
        {
            __finished(__ex);
            return;
        }
        __send();
    }

    protected final void
    __response(boolean __ok)
    {
        Parameter[] __ret;
        try
        {
            if(!__ok)
            {
                try
                {
                    __is.throwException();
                }
                catch(JobException __ex)
                {
                    ice_exception(__ex);
                    return;
                }
                catch(TooManyJobsException __ex)
                {
                    ice_exception(__ex);
                    return;
                }
                catch(Ice.UserException __ex)
                {
                    throw new Ice.UnknownUserException(__ex.ice_name());
                }
            }
            __ret = ParametersHelper.read(__is);
            __is.readPendingObjects();
        }
        catch(Ice.LocalException __ex)
        {
            __finished(__ex);
            return;
        }
        ice_response(__ret);
    }
}
